<?php

class Application_Model_DbTable_Products extends Zend_Db_Table_Abstract
{

    protected $_name = 'products';

    public function getProduct($prod_no)
    {
    	$prod_no = (int) $prod_no;
    	$row = $this->fetchRow('prod_no= '.$prod_no);
    	if (!$row)
    	{
    		throw new Exception("Could not find row $prod_no");
    	}
    	return $row->toArray();
    }
	
    public function addqtyProduct($prod_no, $item_qty)
    {
    	$data = array(
    		'prod_quantity' => $item_qty
    	);
    	$this->update($data, 'prod_no = '. (int)$prod_no);
    }
}

